<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${packageName}.mapper.${className}Mapper">



    <sql id="column_list">
        ${column}
    </sql>


    <!--组装查询条件-->
    <sql id="where_param">
          <#list paramList as param>
              <if test="${param.classFieldName} != null">
                    ${param.whereSql}
              </if>
          </#list>
    </sql>




    <!--根据分页对象查询分页-->
    <select id="getPage" resultType="${packageName}.bo.${lowerClassName}.vo.${className}Vo">
        select
        <include refid="column_list" />
        from  ${tableName} as a
        <where>
            <include refid="where_param"></include>
        </where>
        <if test="sort!=null">
            order by ${r'${sort}'}  ${r'${order}'}
        </if>
    </select>





</mapper>